package com.bridgeintelligent.tag.webserver.schedule.api.enums;

import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @description
 * @author: grp 2021-01-13 09:59
 **/
@Getter
public enum TaskEnum {
    TASK_FREE_Q("01", "定制标签质量"),
    TASK_CUSTOMERS_AMOUNT("02","客群人数"),
    TASK_TAG_STOP("03","标签自动停用");
    private String id;
    private String name;

    TaskEnum(String id, String name){
        this.id = id;
        this.name = name;
    }

    public static String getName(String id){
        for(TaskEnum ele:values()){
            if(StringUtils.equals(id, ele.getId())){
                return ele.getName();
            }
        }
        return null;
    }
}
